using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Ent.Web.Helper;
using System.Collections.Generic;
using Ent.Web.CSH;

public partial class FAQ_General : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        hcGen.Clear();
        string type = Request.QueryString["type"];
        if (type == null || type == "")
            type = "General";
        lblHelpTitle.Text = Common.GetImageText("smile", type);
        ShowFAQ(type);
    }
    void ShowFAQ(string type)
    {
        hcGen.Append("<div class=\"list_header\">" + type + "<span style=\"float:right;\"><a href=\""+ConfigurationManager.AppSettings["BaseUrl"] + "/ContactUs.aspx" +"\">" + ResourceHelper.Get("LBL_PostQuery") + "</a></span></div>");
        List<KeyValuePair<string, string>> list = FAQHelper.GetFAQContent(type);
        foreach (KeyValuePair<string, string> item in list)
        {
            switch (item.Key.ToLower())
            {
                case "help":
                    string Language = Session["LANG"] == null ? "en-US" : Session["LANG"].ToString();
                    HelpDocument hd = new HelpDocument(Language, HttpRuntime.AppDomainAppPath);
                    hcGen.Append("&nbsp;&nbsp;&nbsp;&nbsp;" + hd.GetSummary(item.Value));
                    hcGen.Append("<br/><br/><span class=\"text14\"><b>" + ResourceHelper.Get("LBL_Description") + "</b></span><br/>");
                    hcGen.Append("&nbsp;&nbsp;&nbsp;&nbsp;" + hd.GetDetail(item.Value) + "<br/><br/>");
                    break;
                case "faq":
                    ShowFAQ(item.Value);
                    break;
                case "text":
                    hcGen.Append(item.Value);
                    break;
                default:
                    break;
            }
        }
    }
}
